From f16fc99391e4de44d96ea0993e7c923679e6c161 Mon Sep 17 00:00:00 2001 From: Matthias Clasen Date: Sat, 30 May 2015 21:24:23 -0400 Subject: [PATCH] combo box: Fix compiler warnings Fix warnings due to -Wdeclaration-after-statement and -Wshadow. --- gtk/gtkcombobox.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/gtk/gtkcombobox.c b/gtk/gtkcombobox.c index ccda6ad457..f9c7ba86e4 100644 --- a/gtk/gtkcombobox.c +++ b/gtk/gtkcombobox.c @@ -2622,14 +2622,13 @@ gtk_combo_box_size_allocate (GtkWidget *widget, if (gtk_widget_get_visible (priv->popup_widget)) { - gint width, menu_width; + gint menu_width; if (priv->wrap_width == 0) { GtkAllocation combo_box_allocation; gtk_widget_get_allocation (GTK_WIDGET (combo_box), &combo_box_allocation); - width = combo_box_allocation.width; gtk_widget_set_size_request (priv->popup_widget, -1, -1); if (combo_box->priv->popup_fixed_width) @@ -2638,7 +2637,7 @@ gtk_combo_box_size_allocate (GtkWidget *widget, gtk_widget_get_preferred_width (priv->popup_widget, NULL, &menu_width); gtk_widget_set_size_request (priv->popup_widget, - MAX (width, menu_width), -1); + MAX (combo_box_allocation.width, menu_width), -1); } /* reposition the menu after giving it a new width */ -- 2.30.2